home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / compile_to_c5.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  14.5 KB  |  651 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_c.h"
  9. void r400set_all_with(T400 C,T0* a1,int a2){
  10. int _i=0;
  11. _i=a2;
  12. while (!((_i)<(0))) {
  13. (C)[_i]=(a1);
  14. _i=(_i)-(1);
  15. }
  16. }
  17. int r400fast_index_of(T400 C,T0* a1,int a2){
  18. int R=0;
  19. while (!(((R)>(a2))||((a1)==((void*)((C)[R]))))) {
  20. R=(R)+(1);
  21. }
  22. return R;
  23. }
  24. void r400copy_from(T400 C,T400 a1,int a2){
  25. int _i=0;
  26. _i=a2;
  27. while (!((_i)<(0))) {
  28. (C)[_i]=((a1)[_i]);
  29. _i=(_i)-(1);
  30. }
  31. }
  32. T400 r400realloc(T400 C,int a1,int a2){
  33. T400 R=NULL;
  34. R=calloc(a2,sizeof(T0*));
  35. r400copy_from(R,C,(a1)-(1));
  36. return R;
  37. }
  38. int r400equal_like(T0* a1,T0* a2){
  39. int R=0;
  40. /*IF*//*AF*//*AF*/if ((a1)==((void*)(a2))) {
  41. R=1;
  42. }
  43.  else if (((a1)==((void*)(NULL)))||((a2)==((void*)(NULL)))) {
  44. }
  45. else {
  46. R=r7is_equal(((T7*)a1),a2);
  47. }
  48. /*FI*/return R;
  49. }
  50. int r400index_of(T400 C,T0* a1,int a2){
  51. int R=0;
  52. while (!(((R)>(a2))||(r400equal_like(a1,(C)[R])))) {
  53. R=(R)+(1);
  54. }
  55. return R;
  56. }
  57. void r705copy_from(T705 C,T705 a1,int a2){
  58. int _i=0;
  59. _i=a2;
  60. while (!((_i)<(0))) {
  61. (C)[_i]=((a1)[_i]);
  62. _i=(_i)-(1);
  63. }
  64. }
  65. T705 r705realloc(T705 C,int a1,int a2){
  66. T705 R=NULL;
  67. R=calloc(a2,sizeof(T0*));
  68. r705copy_from(R,C,(a1)-(1));
  69. return R;
  70. }
  71. void r513copy_from(T513 C,T513 a1,int a2){
  72. int _i=0;
  73. _i=a2;
  74. while (!((_i)<(0))) {
  75. (C)[_i]=((a1)[_i]);
  76. _i=(_i)-(1);
  77. }
  78. }
  79. T513 r513realloc(T513 C,int a1,int a2){
  80. T513 R=NULL;
  81. R=calloc(a2,sizeof(T0*));
  82. r513copy_from(R,C,(a1)-(1));
  83. return R;
  84. }
  85. void r221copy_from(T221 C,T221 a1,int a2){
  86. int _i=0;
  87. _i=a2;
  88. while (!((_i)<(0))) {
  89. (C)[_i]=((a1)[_i]);
  90. _i=(_i)-(1);
  91. }
  92. }
  93. T221 r221realloc(T221 C,int a1,int a2){
  94. T221 R=NULL;
  95. R=calloc(a2,sizeof(T0*));
  96. r221copy_from(R,C,(a1)-(1));
  97. return R;
  98. }
  99. void r686clear_all(T686 C,int a1){
  100. int _i=0;
  101. int _v=0;
  102. _i=a1;
  103. while (!((_i)<(0))) {
  104. (C)[_i]=(_v);
  105. _i=(_i)-(1);
  106. }
  107. }
  108. void r686set_all_with(T686 C,int a1,int a2){
  109. int _i=0;
  110. _i=a2;
  111. while (!((_i)<(0))) {
  112. (C)[_i]=(a1);
  113. _i=(_i)-(1);
  114. }
  115. }
  116. int r686fast_index_of(T686 C,int a1,int a2){
  117. int R=0;
  118. while (!(((R)>(a2))||((a1)==((C)[R])))) {
  119. R=(R)+(1);
  120. }
  121. return R;
  122. }
  123. void r686copy_from(T686 C,T686 a1,int a2){
  124. int _i=0;
  125. _i=a2;
  126. while (!((_i)<(0))) {
  127. (C)[_i]=((a1)[_i]);
  128. _i=(_i)-(1);
  129. }
  130. }
  131. T686 r686realloc(T686 C,int a1,int a2){
  132. T686 R=NULL;
  133. R=calloc(a2,sizeof(int));
  134. r686copy_from(R,C,(a1)-(1));
  135. return R;
  136. }
  137. void r857set_all_with(T857 C,T0* a1,int a2){
  138. int _i=0;
  139. _i=a2;
  140. while (!((_i)<(0))) {
  141. (C)[_i]=(a1);
  142. _i=(_i)-(1);
  143. }
  144. }
  145. void r857copy_from(T857 C,T857 a1,int a2){
  146. int _i=0;
  147. _i=a2;
  148. while (!((_i)<(0))) {
  149. (C)[_i]=((a1)[_i]);
  150. _i=(_i)-(1);
  151. }
  152. }
  153. T857 r857realloc(T857 C,int a1,int a2){
  154. T857 R=NULL;
  155. R=calloc(a2,sizeof(T0*));
  156. r857copy_from(R,C,(a1)-(1));
  157. return R;
  158. }
  159. void r44copy_from(T44 C,T44 a1,int a2){
  160. int _i=0;
  161. _i=a2;
  162. while (!((_i)<(0))) {
  163. (C)[_i]=((a1)[_i]);
  164. _i=(_i)-(1);
  165. }
  166. }
  167. T44 r44realloc(T44 C,int a1,int a2){
  168. T44 R=NULL;
  169. R=calloc(a2,sizeof(T0*));
  170. r44copy_from(R,C,(a1)-(1));
  171. return R;
  172. }
  173. void r191copy_from(T191 C,T191 a1,int a2){
  174. int _i=0;
  175. _i=a2;
  176. while (!((_i)<(0))) {
  177. (C)[_i]=((a1)[_i]);
  178. _i=(_i)-(1);
  179. }
  180. }
  181. T191 r191realloc(T191 C,int a1,int a2){
  182. T191 R=NULL;
  183. R=calloc(a2,sizeof(T0*));
  184. r191copy_from(R,C,(a1)-(1));
  185. return R;
  186. }
  187. int r7to_integer(T7* C){
  188. int R=0;
  189. int _minus=0;
  190. char _cc=0;
  191. int _state=0;
  192. int _i=0;
  193. _i=1;
  194. while (!((_i)>((((T7*)C))->_count/*4*/))) {
  195. _cc=/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/;
  196. {int z1=_state;
  197.  
  198. if((0==z1)){
  199. /*IF*/if (r3is_separator(_cc)) {
  200. }
  201.  else if ((_cc)==('\53')) {
  202. _state=1;
  203. }
  204.  else if ((_cc)==('\55')) {
  205. _minus=1;
  206. _state=1;
  207. }
  208. else {
  209. R=r3value(_cc);
  210. _state=2;
  211. }
  212. /*FI*/}
  213.  else 
  214. if((1==z1)){
  215. /*IF*/if (r3is_separator(_cc)) {
  216. }
  217. else {
  218. R=r3value(_cc);
  219. _state=2;
  220. }
  221. /*FI*/}
  222.  else 
  223. if((2==z1)){
  224. /*IF*/if (r3is_digit(_cc)) {
  225. R=((R)*(10))+(r3value(_cc));
  226. }
  227. else {
  228. _state=3;
  229. }
  230. /*FI*/}
  231.  else {}}
  232. _i=(_i)+(1);
  233. }
  234. /*IF*/if (_minus) {
  235. R=-(R);
  236. }
  237. /*FI*/return R;
  238. }
  239. void r7add_first(T7* C,char a1){
  240. int _i=0;
  241. r7extend(C,'\40');
  242. _i=(((T7*)C))->_count/*4*/;
  243. while (!((_i)==(1))) {
  244. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((_i)-(1))-(1)]/*)*/);
  245. /*]*/
  246. _i=(_i)-(1);
  247. }
  248. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(1)-(1)]=(a1);
  249. /*]*/
  250. }
  251. void r7extend(T7* C,char a1){
  252. int _new_capacity=0;
  253. /*IF*/if (((((T7*)C))->_capacity/*8*/)>((((T7*)C))->_count/*4*/)) {
  254. }
  255.  else if (((((T7*)C))->_capacity/*8*/)==(0)) {
  256. C->_capacity=32;
  257. C->_storage=calloc((((T7*)C))->_capacity/*8*/,sizeof(char));
  258. }
  259. else {
  260. _new_capacity=(2)*((((T7*)C))->_capacity/*8*/);
  261. C->_storage=r9realloc((((T7*)C))->_storage/*0*/,(((T7*)C))->_capacity/*8*/,_new_capacity);
  262. C->_capacity=_new_capacity;
  263. }
  264. /*FI*/C->_count=((((T7*)C))->_count/*4*/)+(1);
  265. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]=(a1);
  266. /*]*/
  267. }
  268. void r7set_last(T7* C,char a1){
  269. /*IF*/if ((((((T7*)C))->_count/*4*/)==(0))||((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]/*)*/)!=(a1))) {
  270. r7extend(C,a1);
  271. }
  272. /*FI*/}
  273. /*No:STRING.remove_suffix*/
  274. void r7to_lower(T7* C){
  275. int _i=0;
  276. _i=(((T7*)C))->_count/*4*/;
  277. while (!((_i)==(0))) {
  278. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(r3to_lower(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/));
  279. /*]*/
  280. _i=(_i)-(1);
  281. }
  282. }
  283. int r7hash_code(T7* C){
  284. int R=0;
  285. R=r9hashcode((((T7*)C))->_storage/*0*/,((((T7*)C))->_count/*4*/)-(1));
  286. return R;
  287. }
  288. /*No:STRING.empty*/
  289. int r7index_of_string(T7* C,T0* a1){
  290. int R=0;
  291. int _i3=0;
  292. int _i2=0;
  293. int _i1=0;
  294. int _stop=0;
  295. _i1=1;
  296. _i2=(((T7*)((T7*)a1)))->_count/*4*/;
  297. _i3=_i2;
  298. while (!((R)!=(0))) {
  299. /*IF*/if ((_i2)>((((T7*)C))->_count/*4*/)) {
  300. R=((((T7*)C))->_count/*4*/)+(1);
  301. }
  302. else {
  303. _stop=0;
  304. while (!(_stop)) {
  305. /*IF*/if ((_i3)==(0)) {
  306. _stop=1;
  307. R=_i1;
  308. }
  309.  else if ((/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i3)-(1)]/*)*/)!=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i2)-(1)]/*)*/)) {
  310. _stop=1;
  311. }
  312. /*FI*/_i3=(_i3)-(1);
  313. _i2=(_i2)-(1);
  314. }
  315. }
  316. /*FI*/_i1=(_i1)+(1);
  317. _i3=(((T7*)((T7*)a1)))->_count/*4*/;
  318. _i2=((_i1)+(_i3))-(1);
  319. }
  320. return R;
  321. }
  322. int r7_px_60(T7* C,T0* a1){
  323. int R=0;
  324. int _i=0;
  325. _i=1;
  326. while (!(((((((T7*)C))->_count/*4*/)<(_i))||(((((T7*)((T7*)a1)))->_count/*4*/)<(_i)))||((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/)!=(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/)))) {
  327. _i=(_i)+(1);
  328. }
  329. /*IF*/if (((((T7*)C))->_count/*4*/)<(_i)) {
  330. R=((((T7*)((T7*)a1)))->_count/*4*/)>=(_i);
  331. }
  332.  else if (((((T7*)((T7*)a1)))->_count/*4*/)<(_i)) {
  333. R=0;
  334. }
  335. else {
  336. R=(((unsigned)(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/))<((unsigned)(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/)));
  337. }
  338. /*FI*/return R;
  339. }
  340. void r7remove_between(T7* C,int a1,int a2){
  341. int _i=0;
  342. _i=a2;
  343. while (!((_i)>=((((T7*)C))->_count/*4*/))) {
  344. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(((a1)+(_i))-(a2))-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((_i)+(1))-(1)]/*)*/);
  345. /*]*/
  346. _i=(_i)+(1);
  347. }
  348. C->_count=((((T7*)C))->_count/*4*/)-(((a2)-(a1))+(1));
  349. }
  350. void r7make(T7* C,int a1){
  351. /*IF*/if ((a1)>(0)) {
  352. /*IF*/if (((((T7*)C))->_capacity/*8*/)<(a1)) {
  353. C->_storage=calloc(a1,sizeof(char));
  354. C->_capacity=a1;
  355. }
  356. /*FI*/}
  357. /*FI*/C->_count=0;
  358. }
  359. void* r7to_external(T7* C){
  360. void* R=0;
  361. /*IF*/if (((((T7*)C))->_capacity/*8*/)>((((T7*)C))->_count/*4*/)) {
  362. C->_count=((((T7*)C))->_count/*4*/)+(1);
  363. /*IF*/if ((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]/*)*/)!=('\0')) {
  364. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]=('\0');
  365. /*]*/
  366. }
  367. /*FI*/}
  368. else {
  369. r7extend(C,'\0');
  370. }
  371. /*FI*/C->_count=((((T7*)C))->_count/*4*/)-(1);
  372. R=((void*)(((T7*)C))->_storage/*0*/);
  373. return R;
  374. }
  375. /*No:STRING.item*/
  376. void r7reverse(T7* C){
  377. int _i2=0;
  378. int _i1=0;
  379. _i1=1;
  380. _i2=(((T7*)C))->_count/*4*/;
  381. while (!((_i1)>=(_i2))) {
  382. r7swap(C,_i1,_i2);
  383. _i1=(_i1)+(1);
  384. _i2=(_i2)-(1);
  385. }
  386. }
  387. int r7has_string(T7* C,T0* a1){
  388. int R=0;
  389. R=(r7index_of_string(C,a1))!=(((((T7*)C))->_count/*4*/)+(1));
  390. return R;
  391. }
  392. void r7remove_first(T7* C,int a1){
  393. /*IF*/if ((a1)>(0)) {
  394. r7remove_between(C,1,a1);
  395. }
  396. /*FI*/}
  397. /*No:STRING.clear*/
  398. /*No:STRING.storage*/
  399. T0* r7twin(T7* C){
  400. T0* R=NULL;
  401. R=malloc(sizeof(*C));
  402. *((T7*)R)=M7;
  403. r7copy(((T7*)R),((T0*)C));
  404. return R;
  405. }
  406. int r7is_equal(T7* C,T0* a1){
  407. int R=0;
  408. /*IF*/if ((C)==((void*)(a1))) {
  409. R=1;
  410. }
  411.  else if (((((T7*)C))->_count/*4*/)==((((T7*)((T7*)a1)))->_count/*4*/)) {
  412. /*IF*/if (((((T7*)C))->_count/*4*/)>(0)) {
  413. R=r9fast_memcmp((((T7*)C))->_storage/*0*/,(((T7*)((T7*)a1)))->_storage/*0*/,(((T7*)C))->_count/*4*/);
  414. }
  415. else {
  416. R=1;
  417. }
  418. /*FI*/}
  419. /*FI*/return R;
  420. }
  421. int r7has_prefix(T7* C,T0* a1){
  422. int R=0;
  423. int _i=0;
  424. /*IF*/if (((((T7*)((T7*)a1)))->_count/*4*/)<=((((T7*)C))->_count/*4*/)) {
  425. _i=(((T7*)((T7*)a1)))->_count/*4*/;
  426. while (!(((_i)==(0))||((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/)!=(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/)))) {
  427. _i=(_i)-(1);
  428. }
  429. R=(_i)==(0);
  430. }
  431. /*FI*/return R;
  432. }
  433. void r7swap(T7* C,int a1,int a2){
  434. char _tmp=0;
  435. _tmp=/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(a1)-(1)]/*)*/;
  436. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(a1)-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(a2)-(1)]/*)*/);
  437. /*]*/
  438. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(a2)-(1)]=(_tmp);
  439. /*]*/
  440. }
  441. char r7last(T7* C){
  442. char R=0;
  443. R=/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]/*)*/;
  444. return R;
  445. }
  446. /*No:STRING.capacity*/
  447. int r7has_suffix(T7* C,T0* a1){
  448. int R=0;
  449. int _i2=0;
  450. int _i1=0;
  451. /*IF*/if (((((T7*)((T7*)a1)))->_count/*4*/)<=((((T7*)C))->_count/*4*/)) {
  452. _i1=(((((T7*)C))->_count/*4*/)-((((T7*)((T7*)a1)))->_count/*4*/))+(1);
  453. _i2=1;
  454. while (!((((_i1)>((((T7*)C))->_count/*4*/))||((_i2)>((((T7*)((T7*)a1)))->_count/*4*/)))||((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i1)-(1)]/*)*/)!=(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i2)-(1)]/*)*/)))) {
  455. _i1=(_i1)+(1);
  456. _i2=(_i2)+(1);
  457. }
  458. R=(_i1)>((((T7*)C))->_count/*4*/);
  459. }
  460. /*FI*/return R;
  461. }
  462. int r7has(T7* C,char a1){
  463. int R=0;
  464. R=(r7index_of(C,a1))!=(((((T7*)C))->_count/*4*/)+(1));
  465. return R;
  466. }
  467. void r7copy(T7* C,T0* a1){
  468. C->_count=(((T7*)((T7*)a1)))->_count/*4*/;
  469. /*IF*/if (((((T7*)C))->_count/*4*/)>(0)) {
  470. /*IF*/if (((((T7*)C))->_capacity/*8*/)<((((T7*)C))->_count/*4*/)) {
  471. C->_storage=calloc((((T7*)C))->_count/*4*/,sizeof(char));
  472. C->_capacity=(((T7*)C))->_count/*4*/;
  473. }
  474. /*FI*/r9copy_from((((T7*)C))->_storage/*0*/,(((T7*)((T7*)a1)))->_storage/*0*/,((((T7*)C))->_count/*4*/)-(1));
  475. }
  476. /*FI*/}
  477. int r7same_as(T7* C,T0* a1){
  478. int R=0;
  479. int _i=0;
  480. /*IF*/if ((a1)==((void*)(C))) {
  481. R=1;
  482. }
  483. else {
  484. /*IF*/if (((((T7*)((T7*)a1)))->_count/*4*/)!=((((T7*)C))->_count/*4*/)) {
  485. }
  486. else {
  487. _i=(((T7*)C))->_count/*4*/;
  488. while (!(((_i)==(0))||(!(r3same_as(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/,/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/))))) {
  489. _i=(_i)-(1);
  490. }
  491. R=(_i)==(0);
  492. }
  493. /*FI*/}
  494. /*FI*/return R;
  495. }
  496. /*No:STRING.put*/
  497. void r7prepend(T7* C,T0* a1){
  498. int _old_count=0;
  499. int _i=0;
  500. _old_count=(((T7*)C))->_count/*4*/;
  501. _i=(((T7*)((T7*)a1)))->_count/*4*/;
  502. while (!((_i)==(0))) {
  503. r7extend(C,'\40');
  504. _i=(_i)-(1);
  505. }
  506. _i=(((T7*)C))->_count/*4*/;
  507. while (!((_old_count)==(0))) {
  508. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_old_count)-(1)]/*)*/);
  509. /*]*/
  510. _i=(_i)-(1);
  511. _old_count=(_old_count)-(1);
  512. }
  513. _i=(((T7*)((T7*)a1)))->_count/*4*/;
  514. while (!((_i)==(0))) {
  515. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/);
  516. /*]*/
  517. _i=(_i)-(1);
  518. }
  519. }
  520. /*No:STRING.count*/
  521. void r7to_upper(T7* C){
  522. int _i=0;
  523. _i=(((T7*)C))->_count/*4*/;
  524. while (!((_i)==(0))) {
  525. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(r3to_upper(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/));
  526. /*]*/
  527. _i=(_i)-(1);
  528. }
  529. }
  530. void r7remove_last(T7* C,int a1){
  531. C->_count=((((T7*)C))->_count/*4*/)-(a1);
  532. }
  533. /*No:STRING.first*/
  534. int r7index_of(T7* C,char a1){
  535. int R=0;
  536. R=(1)+(r9fast_index_of((((T7*)C))->_storage/*0*/,a1,((((T7*)C))->_count/*4*/)-(1)));
  537. return R;
  538. }
  539. int r7binary_to_integer(T7* C){
  540. int R=0;
  541. int _i=0;
  542. _i=1;
  543. while (!((_i)>((((T7*)C))->_count/*4*/))) {
  544. /*IF*/if ((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/)==('1')) {
  545. R=((2)*(R))+(1);
  546. }
  547. else {
  548. R=(2)*(R);
  549. }
  550. /*FI*/_i=(_i)+(1);
  551. }
  552. return R;
  553. }
  554. void r7append(T7* C,T0* a1){
  555. int _i=0;
  556. _i=1;
  557. while (!((_i)>((((T7*)((T7*)a1)))->_count/*4*/))) {
  558. r7extend(C,/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/);
  559. _i=(_i)+(1);
  560. }
  561. }
  562. /*No:ARRAY[INTEGER_CONSTANT].clear_all*/
  563. /*No:ARRAY[INTEGER_CONSTANT].set_all_with*/
  564. void r28make(T28* C,int a1,int a2){
  565. int _needed=0;
  566. C->_lower=a1;
  567. C->_upper=a2;
  568. _needed=((a2)-(a1))+(1);
  569. /*IF*/if ((_needed)>(0)) {
  570. /*IF*/if (((((T28*)C))->_capacity/*8*/)<(_needed)) {
  571. /*IF*/if (((((T28*)C))->_capacity/*8*/)==(0)) {
  572. C->_storage=calloc(_needed,sizeof(T0*));
  573. }
  574. else {
  575. C->_storage=calloc(_needed,sizeof(T0*));
  576. }
  577. /*FI*/C->_capacity=_needed;
  578. }
  579. else {
  580. /*[IRF3.6clear_all*/{T28* C1=C;
  581. T0* __value=NULL;
  582. /*[IRF3.6set_all_with*/{T28* C2=C1;
  583. T0* c1=__value;
  584. r392set_all_with((((T28*)C2))->_storage/*4*/,c1,((((T28*)C2))->_upper/*12*/)-((((T28*)C2))->_lower/*16*/));
  585. }/*]*/
  586. }/*]*/
  587. }
  588. /*FI*/}
  589. /*FI*/}
  590. T0* r28item(T28* C,int a1){
  591. T0* R=NULL;
  592. R=((((T28*)C))->_storage/*4*/)[(a1)-((((T28*)C))->_lower/*16*/)];
  593. return R;
  594. }
  595. /*No:ARRAY[INTEGER_CONSTANT].storage*/
  596. T0* r28twin(T28* C){
  597. T0* R=NULL;
  598. R=malloc(sizeof(*C));
  599. *((T28*)R)=M28;
  600. r28copy(((T28*)R),((T0*)C));
  601. return R;
  602. }
  603. /*No:ARRAY[INTEGER_CONSTANT].capacity*/
  604. void r28copy(T28* C,T0* a1){
  605. int _needed_capacity=0;
  606. C->_lower=(((T28*)((T28*)a1)))->_lower/*16*/;
  607. C->_upper=(((T28*)((T28*)a1)))->_upper/*12*/;
  608. _needed_capacity=(((((T28*)C))->_upper/*12*/)-((((T28*)C))->_lower/*16*/))+(1);
  609. /*IF*/if (((((T28*)C))->_capacity/*8*/)<(_needed_capacity)) {
  610. C->_capacity=_needed_capacity;
  611. C->_storage=calloc((((T28*)C))->_capacity/*8*/,sizeof(T0*));
  612. }
  613. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  614. r392copy_from((((T28*)C))->_storage/*4*/,(((T28*)((T28*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  615. }
  616. /*FI*/}
  617. /*No:ARRAY[INTEGER_CONSTANT].lower*/
  618. /*No:ARRAY[INTEGER_CONSTANT].put*/
  619. /*No:ARRAY[INTEGER_CONSTANT].upper*/
  620. int r28count(T28* C){
  621. int R=0;
  622. R=(((((T28*)C))->_upper/*12*/)-((((T28*)C))->_lower/*16*/))+(1);
  623. return R;
  624. }
  625. void r28add_last(T28* C,T0* a1){
  626. int _new_capacity=0;
  627. /*IF*/if (((((T28*)C))->_capacity/*8*/)<((r28count(C))+(1))) {
  628. /*IF*/if (((((T28*)C))->_capacity/*8*/)==(0)) {
  629. C->_capacity=16;
  630. C->_storage=calloc((((T28*)C))->_capacity/*8*/,sizeof(T0*));
  631. }
  632. else {
  633. _new_capacity=(2)*((((T28*)C))->_capacity/*8*/);
  634. C->_storage=r392realloc((((T28*)C))->_storage/*4*/,(((T28*)C))->_capacity/*8*/,_new_capacity);
  635. C->_capacity=_new_capacity;
  636. }
  637. /*FI*/}
  638. /*FI*/C->_upper=((((T28*)C))->_upper/*12*/)+(1);
  639. /*[IRF3.6put*/{T28* C1=C;
  640. T0* b1=a1;
  641. int b2=(((T28*)C))->_upper/*12*/;
  642. ((((T28*)C1))->_storage/*4*/)[(b2)-((((T28*)C1))->_lower/*16*/)]=(b1);
  643. }/*]*/
  644. }
  645. T0* r28first(T28* C){
  646. T0* R=NULL;
  647. R=r28item(C,(((T28*)C))->_lower/*16*/);
  648. return R;
  649. }
  650.  
  651.